|
|
|
|
|
|
|
Command line arguments can also be passed to the application using the Make tab on the Projects Properties dialog box, as shown in Figure 18.18. |
|
|
|
|
|
|
|
|
Figure 18.18.
Passing command line arguments in the Project
Properties Make tab. |
|
|
|
|
|
|
|
|
In addition to command line arguments, you can also pass conditional compilation arguments to the application. By using the conditional compilation arguments, you can have whole sections of code included in the application only when you specify certain arguments when you compile the application. This gives you the capability of removing any debugging statements from your application when you distribute the application. An example of conditional code is shown in the following code: |
|
|
|
|
|
|
|
|
#If conFrenchVersion Then
' <code specific to the French language version>.
#ElseIf conGermanVersion then
' <code specific to the German language version>.
#Else
' <code specific to other versions>.
#End If |
|
|
|
|
|
|
|
|
This enables you to add code to your application that can be used in different versions of the application, such as different languages. |
|
|
|
|
|
|
|
|
The Debug object is used during the testing and debugging of an application to send output directly to the Immediate window or to force an assertion in the code when a specified condition is either True or False. |
|
|
|
|
|
|
|
|
An assertion is a convenient way to test for conditions that should exist at a given point in your application. In Visual Basic, assertions are created using the Debug object and the |
|
|
|
|
|